﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace Scada.DataApi
{
    public class Settings
    {
        private string configFile;

        public static Settings Instance = new Settings();

        private XmlDocument doc = new XmlDocument();


        private Settings()
        {
            string path = this.GetType().Assembly.Location;
            this.configFile = string.Format("{0}\\..\\remote.cfg", path);

            this.LoadSettings();
        }

        private void LoadSettings()
        {
            if (File.Exists(this.configFile))
            {
                doc.Load(this.configFile);
            }
        }
    }
}
